﻿namespace Bilibili.Model.Common
{
    public sealed class ApiDataModel<T>
    {
        public int Code { get; set; }
        private string _message;
        public string Message
        {
            get
            {
                if (string.IsNullOrEmpty(_message))
                    return Msg;
                else
                    return _message;
            }
            set { _message = value; }
        }
        public string Msg { get; set; } = "";
        public bool Success
        {
            get
            {
                return Code == 0;
            }
        }
        public T Data { get; set; }
    }
}